import request from "@/utils/request";

// 查询试验流程列表（分页）
export function getTrialProcessList(query) {
  return request({
    url: "/sources/flow/list",
    method: "get",
    params: query,
  });
}

// 发起
export function startTrialProcess(data) {
  return request({
    url: "/sources/flow/submitTrial",
    method: "post",
    data: data,
  });
}

// 获取表单详情
export function getProcessFormById(id) {
  return request({
    url: "/sources/flow/" + id,
    method: "get",
  });
}

// 审批节点获取表单
export function getExamineFormById(id) {
  return request({
    url: "/sources/flow/trialflowId/" + id,
    method: "get",
  });
}

//审批通过/驳回
export function processPassOrReject(data) {
  return request({
    url: "/sources/flow/approval",
    method: "post",
    data: data,
  });
}

// 查看试验流程日志
export function getTrialProcessLog(query) {
  return request({
    url: "/sources/flowRecord/list",
    method: "get",
    params: query,
  });
}

// 想定方案配置
export function submitPlan(data) {
  return request({
    url: "/sources/trialflowscheme/approval",
    method: "post",
    data: data,
  });
}

// 重新提交表单
export function recommit(data) {
  return request({
    url: "/sources/flow/recommit",
    method: "post",
    data: data,
  });
}

// 解析想定方案
export function parseScheme(data) {
  return request({
    url: "/sources/trialflowscheme/parsing",
    method: "post",
    data: data,
  });
}

// 想定方案匹配模拟器对象
export function matchSimulator(data) {
  return request({
    url: "/sources/trialflowscheme/match",
    method: "post",
    data: data,
  });
}
// 试验仿真时统
export function trialtTimeConsistency(query) {
  return request({
    url: "/sources//trialFlowSimulation/timeConsistency",
    method: "get",
    params: query,
  });
}
// 试验仿真初始化
export function trialSimulatorInit(query) {
  return request({
    url: "/sources/trialFlowSimulation/init",
    method: "get",
    params: query,
  });
}

// 试验仿真开始
export function trialSimulatorStart(query) {
  return request({
    url: "/sources/trialFlowSimulation/start",
    method: "get",
    params: query,
  });
}

// 试验仿真结束
export function trialSimulatorEnd(query) {
  return request({
    url: "/sources/trialFlowSimulation/end",
    method: "get",
    params: query,
  });
}

// 试验仿真暂停
export function trialSimulatorPause(query) {
  return request({
    url: "/sources/trialFlowSimulation/pause",
    method: "get",
    params: query,
  });
}

// 试验仿真恢复
export function trialSimulatorRecover(query) {
  return request({
    url: "/sources/trialFlowSimulation/recover",
    method: "get",
    params: query,
  });
}

// 参训对象对象配置
export function submitAndDeliver(data) {
  return request({
    url: "/sources/trialflowscheme/fileSending",
    method: "post",
    data: data,
  });
}

// 任务级模拟器添加
export function addRwjSim(data) {
  return request({
    url: "/sources/trialflowscheme/addRwjSim",
    method: "post",
    data: data,
  });
}

// 任务级模拟器删除
export function delRwjSim(query) {
  return request({
    url: "/sources/trialflowscheme/delRwjSim",
    method: "delete",
    params: query,
  });
}
// 任务级模拟器列表获取
export function getFlowArmamentListByTrialFlowId(query) {
  return request({
    url: "/sources/trialflowscheme/getFlowArmamentListByTrialFlowId",
    method: "get",
    params: query,
  });
}
// 获取受控主机类别
export function getSkServerList() {
  return request({
    url: "/sources/trialflowscheme/getSkServerList",
    method: "get",
  });
}
// 全屏仿真发送数据给后台
export function sendTrialFlowDetail(data) {
  return request({
    url: "/trial/initTrial",
    method: "post",
    data: data,
  });
}
